/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

notification {
  color: -moz-gtk-info-bar-text;
  -moz-appearance: -moz-gtk-info-bar;
  text-shadow: none;
}

notification[type="info"] {
  color: -moz-DialogText;
  background-color: -moz-Dialog;
  -moz-appearance: none;
  border-top: 1px solid ThreeDShadow;
  border-bottom: 1px solid ThreeDShadow;
}

notificationbox[notificationside="top"] > notification[type="info"] {
  border-top-style: none;
}

notificationbox[notificationside="bottom"] > notification[type="info"] {
  border-bottom-style: none;
}

notification[type="critical"] {
  color: white;
  background-image: linear-gradient(rgb(212,0,0), rgb(152,0,0));
  -moz-appearance: none;
}

.notification-inner {
  padding-top: 1px;
  padding-bottom: 1px;
}

.messageText {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.messageText > .text-link {
  color: inherit !important;
  text-decoration: underline;
}

.messageImage {
  width: 16px;
  height: 16px;
  margin-inline-start: 6px;
  margin-inline-end: 1px;
}

/* Default icons for notifications */

.messageImage[type="info"] {
  list-style-image: url("moz-icon://stock/gtk-dialog-info?size=menu");
}

.messageImage[type="warning"] {
  list-style-image: url("moz-icon://stock/gtk-dialog-warning?size=menu");
}

.messageImage[type="critical"] {
  list-style-image: url("moz-icon://stock/gtk-dialog-error?size=menu");
}

.messageCloseButton {
  padding-left: 11px;
  padding-right: 11px;
}

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

.popup-notification-body-container {
  padding: var(--arrowpanel-padding);
}

.popup-notification-icon {
  width: 32px;
  height: 32px;
  margin-inline-end: var(--arrowpanel-padding);
}

.popup-notification-body {
  width: 25em;
}

.popup-notification-closebutton {
  margin-inline-end: -8px;
  margin-top: -8px;
}

.popup-notification-origin:not([value]),
.popup-notification-learnmore-link:not([href]) {
  display: none;
}

.popup-notification-origin {
  margin-bottom: .3em !important;
}

.popup-notification-learnmore-link {
  margin-top: .5em !important;
}

.popup-notification-button-container {
  background-color: var(--arrowpanel-dimmed);
  display: flex;
}

.popup-notification-button-container > toolbarseparator {
  -moz-appearance: none;
  border: 0;
  border-left: 1px solid var(--panel-separator-color);
  margin: 7px 0 7px;
  min-width: 0;
}

.popup-notification-button-container:hover > toolbarseparator {
  margin: 0;
}

.popup-notification-button {
  flex: 1;
  -moz-appearance: none;
  background-color: transparent;
  color: inherit;
  margin: 0;
  padding: 0;
  min-width: 0;
  min-height: 41px;
  border: none;
  border-top: 1px solid var(--panel-separator-color);
}

.popup-notification-button:hover:not([disabled]) {
  background-color: var(--arrowpanel-dimmed);
}

.popup-notification-button:hover:active:not([disabled]) {
  background-color: var(--arrowpanel-dimmed-further);
  box-shadow: 0 1px 0 hsla(210,4%,10%,.05) inset;
}

.popup-notification-button[disabled] {
  background-color: var(--arrowpanel-dimmed-further);
  color: graytext;
  /* the !important is to override the button[disabled] settings in
   * windows/linux button.css */
  -moz-border-top-colors: var(--panel-separator-color) !important;
}

.popup-notification-button[default] {
  flex: 0 50%;
}

.popup-notification-button[default]:not([disabled]) {
  background-color: #0996f8;
  color: white;
}

.popup-notification-button[default]:hover:not([disabled]) {
  background-color: #0675d3;
}

.popup-notification-button[default]:hover:active:not([disabled]) {
  background-color: #0568ba;
}

.popup-notification-button[anonid="secondarybutton"][hidden="true"] ~ .popup-notification-button[default] {
  flex: 1;
}

.popup-notification-button > .button-box {
  padding: 0;
  margin: 0;
  /* prevent double border on windows when focused */
  border: none;
}

.popup-notification-dropmarker {
  flex: none;
  padding: 0 15px;
}

.popup-notification-dropmarker > .button-box > hbox {
  display: none;
}

.popup-notification-dropmarker > .button-box > .button-menu-dropmarker {
  /* This is to override the linux !important */
  -moz-appearance: none !important;
  display: -moz-box;
  padding: 0;
  margin: 0;
}

.popup-notification-dropmarker > .button-box > .button-menu-dropmarker > .dropmarker-icon {
  width: 16px;
  height: 16px;
  list-style-image: url(chrome://global/skin/icons/menubutton-dropmarker.svg);
  filter: url(chrome://global/skin/filters.svg#fill);
  fill: currentColor;
}

.popup-notification-button:-moz-focusring {
  outline: 1px -moz-dialogtext dotted;
  outline-offset: -5px;
}
